<?php
define("_needlogin", "0");
define("_access", "1");
include_once(dirname(__FILE__)."/../include/db.config.php");
$sql = "SELECT id,category,files,name,value,solves,description from challenge where enable=1 order by id asc";
$r = array();
$r['game'] = getAll($sql);

header('Content-Type: application/json; charset=utf-8');
echo json_encode($r, JSON_UNESCAPED_UNICODE);

/*
{
    "game": [
        {
            "category": "WEB", 
            "description": "http://133.130.90.172/5008e9a6ea2ab282a9d646befa70d53a/index.php", 
            "files": [ ], 
            "id": 1, 
            "name": "WEB100", 
            "value": 100
        }
    ]
}
*/

